package com.lyrcsoft.beanpostprocessors;

import com.lyrcsoft.annotations.LyrcsoftPostConstruct;
import javax.annotation.PreDestroy;
import org.springframework.context.annotation.CommonAnnotationBeanPostProcessor;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;

/**
 * 通过自定义个PostProcessor给Spring包一个壳，实现InitMethod。
 *
 * @author fujc-dev@qq.com
 * @date 2023/7/4 21:38
 */
@Component
public class LyrcsoftCommonAnnotationBeanPostProcessor extends CommonAnnotationBeanPostProcessor {

	private static final long serialVersionUID = -1406685908312219063L;

	public LyrcsoftCommonAnnotationBeanPostProcessor() {
		setOrder(Ordered.LOWEST_PRECEDENCE - 3);
		setInitAnnotationType(LyrcsoftPostConstruct.class);
		setDestroyAnnotationType(PreDestroy.class);
		ignoreResourceType("javax.xml.ws.WebServiceContext");
	}
}
